3 Bookdown and Quarto
4 Bookdown and Quarto
Another way to make your analysis more reproducible is to couple the data analysis with the code used to make it. A single RMarkdown (https://rmarkdown.rstudio.com/) file can do this, but it gets cumbersome as your analysis involves more and more steps.
You can use Bookdown (https://bookdown.org/) or Quarto (https://quarto.org/) to organize your analysis into chapters spread out across several notebook files. Quarto is new and is particularly nice because it works with R, Python, Julia, and Observable. It also has lots of output format options (https://quarto.org/docs/output-formats/all-formats.html) and templates including templates that make it easier to submit papers to journals (https://quarto.org/docs/extensions/listing-journals.html).
I did this workshop in Quarto. There’s a file in reproducibility_r/notebooks/book called _quarto.yml that spells out all of the options I used with Quarto. After opening the project, you should be able to render this notebook if you run quarto::quarto_render(here::here('notebooks/book'), quiet = TRUE), then open index.html in reproducibility_r/notebooks/book/_book.